<!--_meta 作为公共模版分离出去-->
<include file='public/_meta'>
<!--/meta 作为公共模版分离出去-->
<title>日志记录</title>
</head>
<body>

<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 日志记录 <span class="c-gray en">&gt;</span>  <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
	<div class="text-c" id="search_down"> 添加时间:
		<input type="text" onfocus="WdatePicker({ maxDate:'#F{ $dp.$D(\'datemax\')||\'%y-%M-%d\' }' })" id="datemin" class="input-text Wdate" style="width:120px;">
		-
		<input type="text" onfocus="WdatePicker({ minDate:'#F{ $dp.$D(\'datemin\') }',maxDate:'%y-%M-%d' })" id="datemax" class="input-text Wdate" style="width:120px;">
		<input type="text" class="input-text" style="width:250px" placeholder="车牌、车架、智能设备号..." id="search_inpute" >
		<button type="submit" class="btn btn-success radius" id="search_btn"><i class="Hui-iconfont">&#xe665;</i> 搜索</button> 
	</div>
    <div class="mt-20">
	<table class="table table-border table-bordered table-hover table-bg table-sort">
		<thead>
			<tr class="text-c">
				<th>操作人员</th>
				<th>事件</th>
				<th>记录时间</th>
			</tr>
		</thead>
		<tbody>
			
		</tbody>
	</table>
	</div>
</div>
<!--_footer 作为公共模版分离出去-->
<include file='public/_footer'>
<!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="__PUBLIC__/lib/My97DatePicker/4.8/WdatePicker.js"></script> 
<script type="text/javascript" src="__PUBLIC__/lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
<script type="text/javascript" src="__PUBLIC__/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">
$(function(){
    var table = $('.table-sort').DataTable({
        "aaSorting": [[ 0, "desc" ]],//默认第几个排序
        // "bStateSave": true,//状态保存
         searching: false,
        "aoColumnDefs": [
          //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
          {"orderable":false,"aTargets":[0,1,2]}// 制定列不参与排序
        ],
        "bProcessing" : true, //开启读取服务器数据时显示正在加载中……特别是大数据量的时候，开启此功能比较好  
        "bServerSide" : true,//服务器处理分页，默认是false，需要服务器处理，必须true  
        "ajax": {
            "url": "{:url('index/journal/index')}",
            "type": "POST"
        },
        displayLength: 10,
        columns: [
        { data: 'nick_name' },
        { data: 'node_name' }, 
        { data: 'create_time' },
        ],
         
    });

    $("#search_btn").click(res=>{
        request();
    });

    $("#search_down").keydown(event=>{
           if (event.which == 13){
                request();
           }
    })

    function request() {
        table.settings()[0].ajax.data = {
            'datemin':$('#datemin').val(),
            'datemax':$('#datemax').val(),
        };
        table.ajax.reload();
    }

});
</script> 
</body>
</html>